class ZRadio extends HTMLElement {
	constructor() {
		super();
		const shadowRoot = this.attachShadow({ mode: 'open' });
		shadowRoot.innerHTML = this.template();

    // let value = this.getAttribute("value");
    // let label = this.getAttribute("label");
	}
	template() {
		return `
			<style>
			</style>
      
      <div class="z-radio-btn-box">
        <span class="z-radio-btn checked" id="z-radio-btn2" data-value="2" name="radio"></span>
        <label for="z-radio-btn">
          <slot name="label">
            单选2
          </slot>
        </label>
      </div>
		`;
	}

  static get observedAttributes() {
    return ['value', 'label']; 
  }

	// 生命周期：首次被插入文档DOM时
	connectedCallback() {
	}
	// 生命周期：从文档DOM中删除时
	disconnectedCallback() {
	}
	// 生命周期：被移动到新的文档时
	adoptedCallback() {
	}
	// 生命周期：监听属性变化
	attributeChangedCallback() {
	}

  aa () {
    alert(1111)
  }
}
customElements.define('z-radio', ZRadio);